package com.bbz.core.concurrency.work3;

public class Singleton {
	private String name;
	
	 public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	private Singleton() { }
	    private volatile static Singleton instance;
	    public static Singleton getInstance(){
	        if(instance==null){
	            synchronized (Singleton.class){
	                if(instance==null){
	                    instance = new Singleton();
	                }
	            }
	        }
	        return instance;
	    }
}
